using JTZY.Model.Business;

namespace JTZY.Model.Order.Dto
{
    /// <summary>
    /// 订单表查询对象
    /// </summary>
    public class CorecmsorderQueryDto : PagerInfo 
    {
        public string orderId { get; set; }
        public int? PayStatus { get; set; }
        public int? Status { get; set; }
        public int? ReceiptType { get; set; }
        public DateTime? BeginCreateTime { get; set; }
        public DateTime? EndCreateTime { get; set; }
        public int? AgentId { get; set; }
        public string userName { get; set; }
        public long userId { get; set; }
        public int? orderType { get; set; }
        public string queryType { get; set; }

        public int? isMini { get; set; }
        public string skuName { get; set; }
        public string snCode { get; set; }
    }

    /// <summary>
    /// 订单表输入输出对象
    /// </summary>
    public class CorecmsorderDto
    {
        [Required(ErrorMessage = "订单号不能为空")]
        [ExcelColumn(Name = "订单号")]
        [ExcelColumnName("订单号")]
        public string OrderId { get; set; }

        [Required(ErrorMessage = "商品总价不能为空")]
        [ExcelColumn(Name = "商品总价")]
        [ExcelColumnName("商品总价")]
        public decimal GoodsAmount { get; set; }

        [Required(ErrorMessage = "已支付的金额不能为空")]
        [ExcelColumn(Name = "已支付的金额")]
        [ExcelColumnName("已支付的金额")]
        public decimal PayedAmount { get; set; }

        [Required(ErrorMessage = "订单实际销售总额不能为空")]
        [ExcelColumn(Name = "订单实际销售总额")]
        [ExcelColumnName("订单实际销售总额")]
        public decimal OrderAmount { get; set; }

        [Required(ErrorMessage = "支付状态不能为空")]
        [ExcelColumn(Name = "支付状态")]
        [ExcelColumnName("支付状态")]
        public int PayStatus { get; set; }

        [Required(ErrorMessage = "发货状态不能为空")]
        [ExcelColumn(Name = "发货状态")]
        [ExcelColumnName("发货状态")]
        public int ShipStatus { get; set; }

        [Required(ErrorMessage = "订单状态不能为空")]
        [ExcelColumn(Name = "订单状态")]
        [ExcelColumnName("订单状态")]
        public int Status { get; set; }

        [Required(ErrorMessage = "订单类型不能为空")]
        [ExcelColumn(Name = "订单类型")]
        [ExcelColumnName("订单类型")]
        public int OrderType { get; set; }

        [Required(ErrorMessage = "配送方式不能为空")]
        [ExcelColumn(Name = "配送方式")]
        [ExcelColumnName("配送方式")]
        public int ReceiptType { get; set; }

        [ExcelColumn(Name = "支付方式代码")]
        [ExcelColumnName("支付方式代码")]
        public string PaymentCode { get; set; }

        [ExcelColumn(Name = "支付时间", Format = "yyyy-MM-dd HH:mm:ss", Width = 20)]
        [ExcelColumnName("支付时间")]
        public DateTime? PaymentTime { get; set; }

        [Required(ErrorMessage = "配送方式ID 关联ship.id不能为空")]
        [ExcelColumn(Name = "配送方式ID 关联ship.id")]
        [ExcelColumnName("配送方式ID 关联ship.id")]
        public int LogisticsId { get; set; }

        [ExcelColumn(Name = "配送方式名称")]
        [ExcelColumnName("配送方式名称")]
        public string LogisticsName { get; set; }

        [Required(ErrorMessage = "配送费用不能为空")]
        [ExcelColumn(Name = "配送费用")]
        [ExcelColumnName("配送费用")]
        public decimal CostFreight { get; set; }

        [Required(ErrorMessage = "用户ID 关联user.id不能为空")]
        [ExcelColumn(Name = "用户ID 关联user.id")]
        [ExcelColumnName("用户ID 关联user.id")]
        public int UserId { get; set; }

        [Required(ErrorMessage = "店铺ID 关联seller.id不能为空")]
        [ExcelColumn(Name = "店铺ID 关联seller.id")]
        [ExcelColumnName("店铺ID 关联seller.id")]
        public int SellerId { get; set; }

        [Required(ErrorMessage = "售后状态不能为空")]
        [ExcelColumn(Name = "售后状态")]
        [ExcelColumnName("售后状态")]
        public int ConfirmStatus { get; set; }

        [ExcelColumn(Name = "确认收货时间", Format = "yyyy-MM-dd HH:mm:ss", Width = 20)]
        [ExcelColumnName("确认收货时间")]
        public DateTime? ConfirmTime { get; set; }

        [Required(ErrorMessage = "自提门店ID，0就是不门店自提不能为空")]
        [ExcelColumn(Name = "自提门店ID，0就是不门店自提")]
        [ExcelColumnName("自提门店ID，0就是不门店自提")]
        public int StoreId { get; set; }

        [Required(ErrorMessage = "收货地区ID不能为空")]
        [ExcelColumn(Name = "收货地区ID")]
        [ExcelColumnName("收货地区ID")]
        public int ShipAreaId { get; set; }

        [ExcelColumn(Name = "收货详细地址")]
        [ExcelColumnName("收货详细地址")]
        public string ShipAddress { get; set; }

        [ExcelColumn(Name = "收货人姓名")]
        [ExcelColumnName("收货人姓名")]
        public string ShipName { get; set; }

        [ExcelColumn(Name = "收货电话")]
        [ExcelColumnName("收货电话")]
        public string ShipMobile { get; set; }

        [Required(ErrorMessage = "商品总重量不能为空")]
        [ExcelColumn(Name = "商品总重量")]
        [ExcelColumnName("商品总重量")]
        public decimal Weight { get; set; }

        [Required(ErrorMessage = "开发票不能为空")]
        [ExcelColumn(Name = "开发票")]
        [ExcelColumnName("开发票")]
        public int TaxType { get; set; }

        [ExcelColumn(Name = "税号")]
        [ExcelColumnName("税号")]
        public string TaxCode { get; set; }

        [ExcelColumn(Name = "发票抬头")]
        [ExcelColumnName("发票抬头")]
        public string TaxTitle { get; set; }

        [Required(ErrorMessage = "使用积分不能为空")]
        [ExcelColumn(Name = "使用积分")]
        [ExcelColumnName("使用积分")]
        public int Point { get; set; }

        [Required(ErrorMessage = "积分抵扣金额不能为空")]
        [ExcelColumn(Name = "积分抵扣金额")]
        [ExcelColumnName("积分抵扣金额")]
        public decimal PointMoney { get; set; }

        [Required(ErrorMessage = "订单优惠金额不能为空")]
        [ExcelColumn(Name = "订单优惠金额")]
        [ExcelColumnName("订单优惠金额")]
        public decimal OrderDiscountAmount { get; set; }

        [Required(ErrorMessage = "商品优惠金额不能为空")]
        [ExcelColumn(Name = "商品优惠金额")]
        [ExcelColumnName("商品优惠金额")]
        public decimal GoodsDiscountAmount { get; set; }

        [Required(ErrorMessage = "优惠券优惠额度不能为空")]
        [ExcelColumn(Name = "优惠券优惠额度")]
        [ExcelColumnName("优惠券优惠额度")]
        public decimal CouponDiscountAmount { get; set; }

        [ExcelColumn(Name = "优惠券信息")]
        [ExcelColumnName("优惠券信息")]
        public string Coupon { get; set; }

        [ExcelColumn(Name = "优惠信息")]
        [ExcelColumnName("优惠信息")]
        public string PromotionList { get; set; }

        [ExcelColumn(Name = "买家备注")]
        [ExcelColumnName("买家备注")]
        public string Memo { get; set; }

        [ExcelColumn(Name = "下单IP")]
        [ExcelColumnName("下单IP")]
        public string Ip { get; set; }

        [ExcelColumn(Name = "卖家备注")]
        [ExcelColumnName("卖家备注")]
        public string Mark { get; set; }

        [Required(ErrorMessage = "订单来源不能为空")]
        [ExcelColumn(Name = "订单来源")]
        [ExcelColumnName("订单来源")]
        public int Source { get; set; }

        [Required(ErrorMessage = "场景值不能为空")]
        [ExcelColumn(Name = "场景值")]
        [ExcelColumnName("场景值")]
        public int Scene { get; set; }

        [Required(ErrorMessage = "是否评论不能为空")]
        [ExcelColumn(Name = "是否评论")]
        [ExcelColumnName("是否评论")]
        public bool IsComment { get; set; }

        [Required(ErrorMessage = "删除标志不能为空")]
        [ExcelColumn(Name = "删除标志")]
        [ExcelColumnName("删除标志")]
        public bool Isdel { get; set; }

        [Required(ErrorMessage = "关联营销类型对象序列不能为空")]
        [ExcelColumn(Name = "关联营销类型对象序列")]
        [ExcelColumnName("关联营销类型对象序列")]
        public int ObjectId { get; set; }

        [Required(ErrorMessage = "创建时间不能为空")]
        [ExcelColumn(Name = "创建时间", Format = "yyyy-MM-dd HH:mm:ss", Width = 20)]
        [ExcelColumnName("创建时间")]
        public DateTime? CreateTime { get; set; }

        [ExcelColumn(Name = "更新时间", Format = "yyyy-MM-dd HH:mm:ss", Width = 20)]
        [ExcelColumnName("更新时间")]
        public DateTime? UpdateTime { get; set; }
        [ExcelColumn(Name = "更新时间", Format = "yyyy-MM-dd HH:mm:ss", Width = 20)]
        [ExcelColumnName("发货时间")]
        public DateTime? SendTime { get; set; }
        [ExcelColumn(Name = "更新时间", Format = "yyyy-MM-dd HH:mm:ss", Width = 20)]
        [ExcelColumnName("收货时间")]
        public DateTime? ReceiveTime { get; set; }
        [ExcelIgnore]
        public List<CorecmsorderitemDto> CorecmsorderitemNav { get; set; }
        [ExcelColumn(Name = "支付状态")]
        public string PayStatusLabel { get; set; }
        [ExcelColumn(Name = "发货状态")]
        public string ShipStatusLabel { get; set; }
        [ExcelColumn(Name = "订单状态")]
        public string StatusLabel { get; set; }
        [ExcelColumn(Name = "配送方式")]
        public string ReceiptTypeLabel { get; set; }
        public string UserName { get; set; }
        [ExcelColumn(Name = "品牌")]
        public string BrandName { get; set; }
        public string DeliveryType {get; set; }
        public int IsMini { get; set; }
    }

    public class OrderPackDto
    {

        public long userId { get; set; }
        /// <summary>
        ///     订单编号
        /// </summary>
        public string orderId { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string afterSalesId { get; set; }
        /// <summary>
        ///     打包信息
        /// </summary>
        public List<Orderdetail> list { get; set; }
    }
}